home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000039_icon-group-sender _Wed Feb 19 01:24:05 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
3KB
Received: by cheltenham.cs.arizona.edu; Thu, 20 Feb 1997 07:52:48 MST
To: icon-group@cs.arizona.edu
Date: 19 Feb 1997 01:24:05 GMT
From: espie@bireme.ens.fr (Marc Espie)
Message-Id: <5edknl$791@nef.ens.fr>
Organization: Ecole Normale Superieure, Paris
Sender: icon-group-request@cs.arizona.edu
Subject: X-Tiles, a puzzle in Icon
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 2909
Fed up with all these postings having nothing to do with our beloved
newsgroup ?
Beginning to believe you are the sole user of Icon left alive ?
This is to announce the first public release of X-Tiles, a graphics
game (puzzle) written in Icon.
The game is rather simple: you are treated to a rectangular playfield
filled with rectangular tiles of various colors. You have to remove all
tiles, knowing you can only remove connected sets of tiles of the same
color. The scoring system heavily favors the removal of big sets of
tiles (for a set s, you score (*s-2) * (*s -2) )
When you remove such a set, all tiles above fall down. Then, if there
are empty columns, other columns slide leftward to fill the gaps
This is a complete game with nice graphics. You can even set up your
own background picture.
THIS IS THE FIRST PUBLIC RELEASE !!! THERE ARE UNDOUBTEDLY *BUGS*
LURKING AROUND... You've been warned !!!
Please check
<URL:ftp://ftp.ens.fr/pub/dmi/users/espie/X-Tiles/X-Tiles-3.3.tgz>
You might wish to get
<URL:ftp://ftp.ens.fr/pub/dmi/users/espie/X-Tiles/x-tiles-snapshot.gif>
as well for an inkling of what the game looks like.
It should work under any recent Icon system that supports graphics... as such,
I have only tested it under Unix in both color and black and white.
Feel free to redistribute, put it into the icon `contrib' area, etc.
Outside of being a rather funny little game, the program itself might
be of interest, as it uses quite a few of Icon specific features. (On the
other side, I tend to obfuscate by using all of Icon niceties at once)
I believe it is a good example of `rapid prototyping': using the original
crude version of the program, it was easy to add various improvements.
Also, it is rather small compared to everything it does:
wc X-Tiles.icn -> 828 2710 18419
(stripping comments and blank lines gives: 569 1791 12775)
It also shows why the Icon compiler still is useful sometimes... For
sizes over 25x25, there is a definite difference in feeling between the
compiled and the interpreted version.
Although the original game algorithm was already not quite trivial to get
right, the current program also tries very hard to compute a minimal set
of changes to display... Considering that connected sets of tiles are
displayed as one big block with only the border highlighted, this can get
rather messy.
There are lots of areas (following up on the mouse pointer, bitmap images,
intricate color handling) where this code clarified lots of things for me.
Anyway, feel free to read the code and discuss anything you deem
interesting... There are probably quite a few areas where this program
could be more elegant.
--
[nosave]<http://www.eleves.ens.fr:8080/home/espie/index.html>
microsoft network is EXPLICITLY forbidden to redistribute this message.
`Seiza no matataki kazoe, uranau koi no yuku e.'
Marc Espie (Marc.Espie@ens.fr)